Xbasic

OBJECT.NAME Function

Syntax

.Name([N options])

Arguments

options

Optional. Numeric

1 = Actual object name (not alias).
16 = Fully qualified object name is returned. E.g. :invoice:browse1:lastname.

Description

Returns the object's name.

The <OBJECT>.NAME() method applies to:

Alpha Anywhere (for <OBJECT> use the keyword "A5")
Control Panel (for <OBJECT> use the keyword "CONTROLPANEL")
Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)
Form Controls (for <OBJECT> use the <CONTROL> pointer or the address of the control)

The <OBJECT>.NAME() method returns object's name.

Example

This script finds the name of the first object on the "Customer" form:

dim frm as P
frm = form.view("Customers")
obj = frm.child(1)
name = obj.name()
? name -> "Customers"

If Flag is 1, the actual name of the layout is returned (not the alias). For example, if two instances of the "customer" form are open, topparent.name() would return "customer" for the first instance, and "customer0" (or some other unique name) for the second instance. However, topparent.name(1) returns "customer" for both instances.

Limitations

Desktop applications only.

See Also